package com.hwadee.property.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsAutoIncrement;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsKey;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.command.BaseModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.LinkedHashMap;

@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "complain")//投诉建议表
public class Complain extends BaseModel {
    @TableId(type = IdType.AUTO)//mybatis-plus主键注解
    @IsAutoIncrement   //自增
    @IsKey             //actable主键注解
    @Column(comment = "记录ID")//对应数据库字段，不配置name会直接采用属性名作为字段名comment是注解
    private Long id;

    @TableField(exist = false)
    private LinkedHashMap<String, String> orderBy;

    @TableField(exist = false)
    private int currentPage;

    @TableField(exist = false)
    private int pageSize;

    @TableField(exist = false)
    private int start;

    @Column(comment = "记录类型，如投诉、建议")
    private String type;
    @Column(comment = "所属小区ID")
    @TableField("community_id")
    private Long communityId;
    @Column(comment = "业主ID")
    @TableField("owner_id")
    private Long ownerId;
    @Column(comment = "投诉（建议）内容")
    @TableField("complain_content")
    private String complainContent;
    @Column(comment = "投诉（建议）附件")
    private String attachment;
    @Column(comment = "投诉（建议）时间")
    @TableField("complain_date")
    private String complainDate;
    @Column(comment = "处理状态，如待处理、处理中、已处理")
    @TableField("processing_status")
    private String processingStatus;
    @Column(comment = "整改措施")
    private String measure;
    @Column(comment = "处理人员 ID，未处理时为 null")
    @TableField("handler_id")
    private Long handlerId;
    @Column(comment = "处理完成时间，未处理时为 null")
    @TableField("completion_date")
    private String completionDate;
}
